#ifndef WATERCRAFT_CONFIG_H
#define WATERCRAFT_CONFIG_H 1

#include <string>
#include <set>
#include <fstream>

class Config 
{
	public:
		Config();
		
		unsigned short port();
		unsigned char max_players();
		std::string name();
		std::string motd();
		std::string is_public();
		bool verify_names();
		std::string map_name();
		int upload();
		
		bool is_admin(std::string str);
		bool is_banned(std::string str);
		
		int add_admin(std::string name);
		int del_admin(std::string name);
		int add_ban(std::string name);
		int del_ban(std::string name);
		
	private:
		unsigned short c_port;
		unsigned char c_max_players;
		std::string c_name;
		std::string c_motd;
		std::string c_public;
		bool c_verify_names;
		std::string c_map_name;
		std::set<std::string> admins;
		std::set<std::string> bans;
		int c_upload;
		
		int save_admins();
		int save_bans();
};

#endif
